import time

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains

chrome=webdriver.Chrome("chromedriver.exe")
driver=webdriver.chrome()
chrome.get("https://www.baidu.com/")


#转化 为鼠标操作 右键
action=ActionChains(chrome)
su=chrome.find_element(By.ID,"su")
time.sleep(3)
action.context_click(su)

#悬浮
action.move_to_element(chrome.find_element(By.CLASS_NAME,"soutu-btn"))
#注意：鼠标操作 都要生效才有用
action.perform()
